package com.briup.Utils;

import java.sql.Timestamp;
import java.util.Calendar;

public class DataUtil {
    /**
     *
     * @param timestamp
     * @return
     * 拿到日期信息
     */
    public static int getDayByTimestamp(Timestamp timestamp) {
        //Calendar日历类
        Calendar canlendar = Calendar.getInstance();
        //设置时间戳
        canlendar.setTimeInMillis(timestamp.getTime());
        //获取月份的第几天
        int data=canlendar.get(Calendar.DAY_OF_MONTH);
        return data;
    }
}
